<div class="col-sm-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>添加/编辑分类</h5>
            <div class="ibox-tools">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal m-t"  action="{{url('backend/catedit')}}" method="post" id="signupForm">
                {{ csrf_field() }}
                <input type="hidden" name="id" value="{{$cat->id or ''}}">
                <input type="hidden" name="type" value="{{$type}}">
                <div class="form-group">
                    <label class="col-sm-3 control-label">分类名：</label>
                    <div class="col-sm-8">
                        <input id="catname" value="{{$cat->catname or ''}}" name="catname" class="form-control" type="text" aria-required="true" aria-invalid="true" class="error">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">请选择上级分类：<br/></label>
                    <div class="col-sm-8">
                        <select class="form-control m-b" name="father_id">
                            <option value="{{$type}}">(不选择默认为二级分类)</option>
                            @foreach($cats as $c)
                                <option value="{{$c->id}}" @isset($cat->father_id)@if($cat->father_id == $c->id)selected="selected" @endif @endisset>{{$c->catname}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="form-group">
                <label class="col-sm-3 control-label">是否展示：</label>
                    <div class="col-sm-9">
                        <label class="radio-inline">
                            <input type="radio" checked="" value="1" id="optionsRadios1" name="is_show">展示</label>
                        <label class="radio-inline">
                            <input type="radio" value="0" id="optionsRadios2" name="is_show">隐藏</label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>